import sys
import libvirt

conn = libvirt.open('qemu:///system')
if conn is None:
    print('Failed to open connection to qemu:///system')
    sys.exit(1)

caps = conn.getCapabilities()
print('Capabilities:')
print(caps)

conn.close()

